    //
//  DeploymentDetailsSummaryController.m
//  jboss-admin
//
//  Created by Christos Vasilakis on 06/07/2010.
//  Copyright 2010 All rights reserved.
//

#import "DeploymentDetailsSummaryController.h"

@implementation DeploymentDetailsSummaryController

@synthesize options;

- (void)viewDidLoad {	
	[super viewDidLoad];
	
	NSArray *array = [[NSArray alloc] initWithObjects: @"SummaryController", nil];
	
	self.options = array;

	[array release];
	
	NSLog(@"DeploymentDetailsSummaryController viewDidLoad");
}


- (void)viewDidUnload {
	[super viewDidUnload];
	
	self.options = nil;
	
	NSLog(@"DeploymentDetailsSummaryController viewDidUnload");
}

- (void)dealloc {
	[options release];
	
	NSLog(@"DeploymentDetailsSummaryController deAlloc");
	
	[super dealloc];
}

#pragma mark -
#pragma mark Table Data Source Methods
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	return [self.options count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView  cellForRowAtIndexPath:(NSIndexPath *)indexPath {
	static NSString *CellIdentifier = @"CellIdentifier";
	
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
	
	if (cell == nil) {
		cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
	}
	
	NSUInteger row = [indexPath row];
	
	NSString *option = [self.options objectAtIndex:row];
	
	cell.textLabel.text = option;
	
	return cell;
}

#pragma mark -
#pragma mark Table Delegate Methods
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//	NSUInteger row = [indexPath row];
	
	/*
	if ([[self.options objectAtIndex:row] isEqualToString:@"Web Applications"]) {
		
	} else {
		UIAlertView *alert = [[UIAlertView alloc]
							  initWithTitle: @"Not implemented yet..."
							  message:nil
							  delegate:nil
							  cancelButtonTitle:@"Cancel"
							  otherButtonTitles:nil];
		[alert show];
		[alert release];
	}
	*/
	
	[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (IBAction)refresh {
}

@end